<template>
  <div class="db">
    <van-tabbar v-model="active" route>
      <van-tabbar-item badge="3" to="/home/home2">
        <span>首页</span>
        <template #icon="props">
          <img :src="props.active ? icon.active : icon.inactive" />
        </template>
      </van-tabbar-item>
      <van-tabbar-item icon="search" to="/home/music">歌单</van-tabbar-item>
      <van-tabbar-item icon="setting-o" to="/home/my">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: 0,
      icon: {
        active: "https://img01.yzcdn.cn/vant/user-active.png",
        inactive: "https://img01.yzcdn.cn/vant/user-inactive.png",
      },
    };
  },
  created() {},
  mounted() {},
  methods: {},
};
</script>

<style lang="scss" scoped>
.db {
  position: absolute;
  z-index: 99999;
  bottom: 0;
}
</style>